def sum():
    '''
    求2+4+6+8+...+100的求和
    :return:
    '''
    sum = 0

    for i in range(2, 101,2):
        print(i)
        if i % 2 == 0:
            sum += i

    return sum


if __name__ == '__main__':
    print(sum())
